<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:comps="http://java.sun.com/jsf/composite/comps"
      xmlns:f="http://java.sun.com/jsf/core" >
    <f:view>
        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Alquila Cosas</title>
        </h:head>
        <h:body >
            <h:outputStylesheet library="css" name="layout.css" />
            <h:outputScript library="javascript" name="util.js" />
            <comps:loginDialog />

            <table id="form:panel" width="1024px" align="center" >
                <tr>
                    <td colspan="3" class="encabezado">
                <ui:insert name="logInfo"/>
                </td>
                </tr>
                <tr>
                    <td id="title" colspan="3" >
                <comps:logoBar />
                </td>
                </tr>
                <tr>    
                    <td valign="top" class="columnaIzq">
                <ui:insert name="left" />

                <ui:repeat value="#{mostrarPublicidad.publicidadesIzq}" var="pub" >
                    <a href="#{pub.url}" >
                        <f:attribute name="url" value="#{pub.url}" />
                        <h:graphicImage value="/imagenpub?id=#{pub.id}" width="140"
                                        alt="#{pub.caption}" style="margin-top: 10px"/>
                    </a>
                </ui:repeat>
                <p:outputPanel rendered="#{empty mostrarPublicidad.publicidadesIzq}" >        
                    <h:link outcome="/vistas/comoPublicitar" >
                        <h:graphicImage value="#{resource['images:publicidadLateral.png']}" 
                                        style="margin-top: 10px"/>
                    </h:link>
                </p:outputPanel>
                </td>
                <td id="principal" valign="top" >
                <ui:insert name="principal"/>
                </td>
                <td width="200px" valign="top">
                <ui:insert name="right" />
                <ui:repeat value="#{mostrarPublicidad.publicidadesDer}" var="pub" >
                    <a href="#{mostrarPublicidad.navegarUrl}" >
                        <h:graphicImage value="/imagenpub?id=#{pub.id}"
                                        alt="#{pub.caption}" width="140" height="200"
                                        style="margin-top: 10px" />
                    </a>
                </ui:repeat>
                <p:outputPanel rendered="#{empty mostrarPublicidad.publicidadesDer}" >
                    <h:link outcome="/vistas/comoPublicitar" >
                        <h:graphicImage value="#{resource['images:publicidadLateral.png']}" 
                                        style="margin-top: 10px"/>
                    </h:link>
                </p:outputPanel>
                </td>
                </tr>
                <tr>
                    <td>
                        <div id="footer"/>
                    </td>
                </tr>
            </table>
        </h:body>
    </f:view>
</html>
